package com.example.composableexample.snackbar

sealed class Failure(message: String? = null) : Exception(message) {
    constructor() : this(null)

    data class ServerError(val responseCode: Int) : Failure()
    object Unknown : Failure()

    data class ValidationError(
        val field: String?,
        override val message: String
    ) : Failure(message)

    data class ValidationErrors(val fields: List<ValidationError>) : Failure()
}
